/* eslint-disable no-console */
export class Queue<T> {
	data: T[] = []

	isEmpty(): boolean {
		return this.data.length === 0
	}

	enQueue(x: T) {
		this.data.push(x)
	}

	deQueue(): T | undefined {
		return this.data.pop()
	}
}

const s = new Queue<number>()
console.log(s.isEmpty())
s.enQueue(3)
s.enQueue(2)
s.enQueue(1)
console.log(s.data)
console.log(s.deQueue())
console.log(s.deQueue())
console.log(s.deQueue())
console.log(s.deQueue())
console.log(s.isEmpty())
